//
//  TextAdaptation.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/10.
//  Copyright © 2016年 KX. All rights reserved.
//

#import "TextAdaptation.h"

@implementation TextAdaptation
+ (CGSize)labelRectWithSize:(CGSize)size LabelText:(NSString *)labelText Font:(UIFont *)font {
    NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:font, NSFontAttributeName, nil];
    CGSize actualsize = [labelText boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil].size;
    return actualsize;
}
@end
